<?php
//error_reporting(0);
$rel_root="C:\Inetpub\wwwroot\newweb2";
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

$bgimg = $rel_root."/images/backg.jpg";
$font = imageloadfont($rel_root.'\dreamofme.gdf');

$txt = isset($_GET['ranID']) ? htmlspecialchars($_GET['ranID']) :'11';
$txt=base64_decode(base64_decode($txt));

$background = ImageCreateFromJPEG($bgimg);
$dx = imagesx($background);
$dy = imagesy($background);

$image = ImageCreateTrueColor($dx, $dy);
$black = ImageColorAllocate($image, 0, 0, 0);
$author = ImageColorAllocate($image, 128, 0, 128);
$bgcolor = ImageColorAllocate($image, 255, 255, 255);
ImageFilledRectangle($image, 0, 0, $dx, $dy, $bgcolor);

ImageCopy($image, $background, 0, 0, 0, 0, $dx, $dy);
ImageDestroy($background); 
imagestring($image,$font,3,5,$txt,$black); 
header("Content-type: image/jpeg");
ImageJPEG($image);
ImageDestroy($image);
?>